package com.designpatterns.frontcontrollerpattern;

public class Dispatcher
{
	private StudentView studentView;
	private HomeView homeView;

	public Dispatcher()
	{
		studentView = new StudentView();
		homeView = new HomeView();
	}

	// 根据请求名称去展示不同的视图
	public void dispatch(String request)
	{
		if (request.equalsIgnoreCase("STUDENT"))
		{
			studentView.show();
		} else
		{
			homeView.show();
		}
	}
}
